package com.study.zookeeper;

import org.apache.zookeeper.KeeperException;

import java.io.IOException;
import java.util.List;

/**
 * zookeeper注册中心接口
 * Created by zhangbo on 2020/5/30.
 */
public interface IZookeeperRegister {

    /**
     * 服务注册
     *
     * @return
     */
    public boolean saveRegister(String path, byte[] registerInfo) throws IOException, KeeperException, InterruptedException;

    /**
     * 获取已注册服务
     *
     * @return
     */
    public byte[] getRegister(String path) throws IOException, KeeperException, InterruptedException;


    public List<String> getRegisterPathList(String path) throws IOException, KeeperException, InterruptedException;


    public boolean deleteRegisterPath(String path) throws IOException, KeeperException, InterruptedException;
}
